<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>PMES流程管理引擎系统-用户登录</TITLE>
<LINK href="css/User_Login.css" type=text/css rel=stylesheet>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<script type="text/javascript" src="jquery/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
function doLogin() {
	$.ajax({
		type : "POST",
		url  : "${APP_PATH}/user/doLogin.do",
		data : {
			"loginacct" : $("#TxtUserName").val(),
			"userpswd"  : $("#TxtPassword").val()
		},
		beforeSend : function() {
			return true;
		},
		success : function( r ) {
			if ( r.success ) {
				window.location.href = "main.jsp";
			} else {
				alert("用户名或密码不正确，登录失败。");
			}
		}
	});
}

function insertUser() {
	$.ajax({
		type : "POST",
		url  : "${APP_PATH}/user/insertUser.do",
		data : {
			"loginacct" : $("#TxtUserName").val(),
			"userpswd"  : $("#TxtPassword").val()
		},
		beforeSend : function() {
			return true;
		},
		success : function( r ) {
			if ( r.success ) {
				window.location.href = "main.jsp";
			} else {
				alert("注册失败。");
			}
		}
	});
}
</script>
</HEAD>
<BODY id=userlogin_body>
<DIV></DIV>
<DIV id=user_login>
<DL>
  <DD id=user_top>
  <UL>
    <LI class=user_top_l></LI>
    <LI class=user_top_c></LI>
    <LI class=user_top_r></LI></UL>
  <DD id=user_main>
  <UL>
    <LI class=user_main_l></LI>
    <LI class=user_main_c>
    <DIV class=user_main_box>
    <UL>
     
      <LI class=user_main_text>用户名： </LI>
      <LI class=user_main_input><INPUT class=TxtUserNameCssClass id=TxtUserName 
      maxLength=20 name=TxtUserName> </LI></UL>
    <UL>
      <LI class=user_main_text>密&nbsp;&nbsp;&nbsp;&nbsp;码： </LI>
      <LI class=user_main_input><INPUT class=TxtPasswordCssClass id=TxtPassword 
      type=password name=TxtPassword> </LI>
      <LI><input id=TxtPassword 
      type="button" name='zhuce' value='注册'  onclick="insertUser()">  &nbsp;&nbsp;&nbsp;在线人数：<%=session.getAttribute("userNumber") %></LI></UL>

    <UL>
      <LI class=user_main_text>Cookie： </LI>
      <LI class=user_main_input><SELECT id=DropExpiration name=DropExpiration> 
        <OPTION value=None selected>不保存</OPTION> <OPTION value=Day>保存一天</OPTION> 
        <OPTION value=Month>保存一月</OPTION> <OPTION 
      value=Year>保存一年</OPTION></SELECT> </LI></UL></DIV></LI>
    <LI class=user_main_r><img src="images/user_botton.gif" style="cursor:pointer;" name=IbtnEnter onclick="doLogin()"> </LI>
    </UL>
  <DD id=user_bottom>
  <UL>
    <LI class=user_bottom_l></LI>
    <LI class=user_bottom_c><SPAN style="MARGIN-TOP: 40px"></SPAN> </LI>
    <LI class=user_bottom_r></LI></UL></DD></DL></DIV><SPAN id=ValrUserName 
style="DISPLAY: none; COLOR: red"></SPAN><SPAN id=ValrPassword 
style="DISPLAY: none; COLOR: red"></SPAN><SPAN id=ValrValidateCode 
style="DISPLAY: none; COLOR: red"></SPAN>
<DIV id=ValidationSummary1 style="DISPLAY: none; COLOR: red"></DIV>

<DIV></DIV>

</FORM></BODY></HTML>
